package com.can.reggie.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.can.reggie.common.R;
import com.can.reggie.dto.DishDto;
import com.can.reggie.entity.Dish;

public interface DishService extends IService<Dish> {

    //新增菜品,同时插入菜品对应的口味数据,需要操作两张表:dish和dish_flavor
    void saveWithFlavor(DishDto dishDto);

    //根据id查询菜品信息和对应的口味信息
    DishDto getByIdWithFlavor(Long id);

    //根据id修改菜品信息和对应的口味信息
    void updateWithFlavor(DishDto dishDto);

    //根据id修改菜品状态
    R<String> stateUpdate(Long[] ids, Integer stateId);

    //根据id更改菜品id_delete状态,和菜品口味表id_delete状态
    R<String> deleteDish(Long[] ids);
}
